package com.qf.pojo;


import com.qf.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ClassName Project
 * @Description TODO
 * @Author Windy
 * @Date 2022/8/25 10:48
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Project {
    /**
     * CREATE TABLE `project` (
     *   `pid` int(11) NOT NULL AUTO_INCREMENT,
     *   `pname` varchar(32) NOT NULL,
     *   `starttime` date DEFAULT NULL,
     *   `endtime` datetime DEFAULT NULL,
     *   `did` varchar(32) DEFAULT NULL,
     *   `cid` varchar(32) DEFAULT NULL,
     *   `updatetime` datetime DEFAULT NULL,
     *   `status` int(11) DEFAULT '1' COMMENT '1代表正常，0代表删除',
     *   PRIMARY KEY (`pid`)
     * ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
     */
    private  int pid;
    private String pname;
    private String starttime;
    private String endtime;
    private String did;
    private String cid;
    private String updatetime;
    private int status;

    private  Developer developer;

    private  Contractor contractor;

    private List<Stage> stages;

    private List<Subitem> subitems;

    private List<Branch> branchs;

    @Override
    public String toString() {
        return "----------------------------------------------\n" +
                "Project{" +
                "pid=" + pid +
                ", pname='" + pname + '\'' +
                ", starttime='" + starttime + '\'' +
                ", endtime='" + endtime + '\'' +
                ", did='" + did + '\'' +
                ", cid='" + cid + '\'' +
                ", updatetime='" + updatetime + '\'' +
                ", status=" + status +
                "\n developer=" + developer +
                "\n contractor=" + contractor +
                "\n stages=\n" + ArrayUtil.changeArray(stages)+
                "\n subitems=\n" + ArrayUtil.changeArray(subitems) +
                "\n branchs=\n" + ArrayUtil.changeArray(branchs) +
                '}'+"\n----------------------------------------------\n";
    }
}
